
<section id="content">

    <div class="page page-fullwidth-layout">

        <div class="pageheader">

            <div class="page-bar">

                <ul class="page-breadcrumb">
                    <li>
                        <a href="{:url('/admin')}"><i class="fa fa-home"></i> 起始页</a>
                    </li>
                    <li>
                        <a href="#">所有线上用户</a>
                    </li>
                </ul>

            </div>
        </div>
        <!-- page content -->
        <div class="pagecontent">

            <!-- row -->
            <div class="row">
                <!-- col -->
                <div class="col-md-12">
                    <!-- tile -->
                    <section class="tile">
                        <form action="{:url('admin/allproducts/onlineUser')}" style="padding-top: 10px;" class="navbar-form form-inline" method="post">
                            <div class="form-group">
                                <label class="control-label" for="input-mobile">手机号码</label>
                                <div class="input-group">
                                    <input type="text" name="mobile" value="" placeholder="手机号码" id="input-mobile" class="form-control">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="control-label">微信昵称</label>
                                <div class="input-group">
                                    <input type="text" name="nickname" value="" placeholder="微信昵称"  id="input-nickname" class="form-control">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="control-label">未录入筛选</label>
                                <div class="input-group">
                                    <select name="is_enter" class="form-control">
                                        <option value="0">否</option>
                                        <option value="1" selected="selected">是</option>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <button type="submit" class="btn btn-primary pull-right"><i class="fa fa-search"></i> 查詢</button>
                            </div>
                            <button  type="button" onclick="saveImport(0);" class="btn btn-primary"><i class="fa"></i>导入未分配客户</button>
                        </form>
                        <!-- tile body -->
                        <div class="tile-body">
                            <div class="alert alert-info" style="display:none;">显示一些提示信息</div>

                            <div class="table-responsive">
                                <table class="table table-striped table-hover table-custom" id="products-list">
                                    <thead>
                                    <tr>
                                        <th><input type="checkbox" onclick="$('input[name*=\'selected\']').prop('checked', this.checked);"></th>
                                        <th>微信昵称</th>
                                        <th>微信头像</th>
                                        <th>手机号码</th>
                                        <th>性别</th>
                                        <th>余额(￥)</th>
                                        <th>积分</th>
                                        <th>会员等级</th>
                                        <th>店铺等级</th>
                                        <th>注册日期</th>
                                        <th>是否认证</th>
                                        <th>需/实用户</th>
                                        <th>操作</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    {volist name='onlines' id='list'}
                                    <tr>
                                        <td><input type="checkbox" name="selected[]" value="{$list['user_id']}"></td>
                                        <td>{$list.nickname}</td>
                                        <td>
                                            <img src="{$list.head_pic}" width="40" height="40" style="border-radius: 50%;">
                                        </td>
                                        <td>{$list.mobile}</td>
                                        <td>
                                            {if condition='$list.sex' eq 1}
                                            男
                                            {elseif condition='$list.sex' eq 2}
                                            女
                                            {else/}
                                            保密
                                            {/if}
                                        </td>
                                        <td>{$list.user_money}</td>
                                        <td>{$list.pay_points}</td>
                                        <td>
                                            {if condition='$list.user_level' eq 1}
                                                V0-v1
                                            {elseif condition='$list.user_level' eq 2}
                                                V1-v2
                                            {elseif condition='$list.user_level' eq 3}
                                                V2-v3
                                            {elseif condition='$list.user_level' eq 4}
                                                V3-v4
                                            {elseif condition='$list.user_level' eq 5}
                                                V4-v5
                                            {/if}
                                        </td>
                                        <td>
                                            {if condition='$list.store_level' eq 1}
                                                游客商户
                                            {elseif condition='$list.store_level' eq 2}
                                                实名商户
                                            {elseif condition='$list.store_level' eq 3}
                                                专业推广
                                            {elseif condition='$list.store_level' eq 4}
                                                高级推广
                                            {elseif condition='$list.store_level' eq 5}
                                                豪华推广
                                            {elseif condition='$list.store_level' eq 6}
                                                企业推广
                                            {/if}
                                        </td>
                                        <td>{$list.reg_time|date='Y-m-d H:i:s',###}</td>
                                        <td>
                                            {if condition='$list.is_authentication' eq 1}
                                                已认证
                                            {else/}
                                                未认证
                                            {/if}
                                        </td>
                                        <td>
                                            {if condition='$list.fictitious' eq 1}
                                                虚拟
                                            {else/}
                                                真实
                                            {/if}
                                        </td>
                                        <td>
                                            <a class="btn btn-info owngoods" href="{:url('admin/customers/owngoods',['mobile'=>$list['mobile']])}">
                                                <i class="glyphicon glyphicon-user icon-white" ></i>
                                                ta的拍品
                                            </a>
                                        </td>
                                    </tr>
                                    {/volist}

                                    </tbody>
                                </table>
                            </div>
                            <div class="text-center"></div>
                        </div>
                        <!-- /tile body -->

                    </section>
                    <!-- /tile -->

                </div>
                <!-- /col -->
            </div>
            <!-- /row -->
        </div>
        <!-- /page content -->
    </div>
    <script type="text/javascript">
        function saveImport(){
            var obj = $("input[name*='selected']");
            var url = "{:url('admin/allproducts/waituser')}";
            if(obj.is(":checked")){
                var check_val = [];
                for(var k in obj){
                    if(obj[k].checked)
                        check_val.push(obj[k].value);
                }
                url += "?users_id_array="+check_val;
                layer.open({
                    type: 2,
                    title: '导入未分配客户',
                    shadeClose: true,
                    shade: 0.8,
                    area: ['580px', '480px'],
                    content: url
                });
                layer.close();
            }else{
                layer.msg('请选择用户');
            }
        }


    </script>
</section>
<!--/ CONTENT -->


